﻿using MongoDB.Driver;
using MongoDB.Driver.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SpyApp.Models.EntytiRepossitory
{
    public class UserExt
    {
        //internal static IEnumerable<AccountModel.AdminView> GetListUser(string _searchString)
        //{
        //    try
        //    {
        //        SafeSystemContext ctx = new SafeSystemContext();
        //        bool serverIsDown = false;
        //        if (!serverIsDown)
        //        {
        //            var query = ctx.Users.AsQueryable();
        //            var query2 = from u in query
        //                    select new AccountModel.AdminView()
        //                    {
        //                        Id = u.Id,
        //                        UserName = u.UserName,
        //                        PassWord = u.PassWord,
        //                        ActiveInvationCode = u.ActiveInvationCode,
        //                        Age = u.Age,
        //                        LastModifined = u.LastModifined,
        //                        Status = u.Status.ToString(),
        //                        TotalLogin = u.TotalLogin,
        //                        UserStatus = u.UserStatus.ToString(),
        //                        UserType = u.UserType.ToString()
        //                    };
        //            return query2;
        //        }
        //        return null;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw;
        //    }
        //}
    }

}